export function setUserPhone(phone) {
  return window.localStorage.setItem('phone', phone);
}
export function getUserPhone() {
  return window.localStorage.getItem('phone');
}

export function setToken(token) {
  return window.localStorage.setItem('Token', token);
}
export function getToken() {
  return window.localStorage.getItem('Token');
}

export function setUserInfo(userInfo = {}) {
  return window.localStorage.setItem('userInfo', JSON.stringify(userInfo));
}
export function getUserInfo() {
  return window.localStorage.getItem('userInfo') ? JSON.parse(window.localStorage.getItem('userInfo')) : {};
}

export function setTenantInfo(tenantInfo = []) {
  return window.localStorage.setItem('tenantInfo', JSON.stringify(tenantInfo));
}
export function getTenantInfo() {
  return window.localStorage.getItem('tenantInfo') ? JSON.parse(window.localStorage.getItem('tenantInfo')) : [];
}
export function setSystemInfo(systemInfo = {}) {
  return window.localStorage.setItem('systemInfo', JSON.stringify(systemInfo));
}
export function getSystemInfo() {
  return window.localStorage.getItem('systemInfo') ? JSON.parse(window.localStorage.getItem('systemInfo')) : [];
}

export function clearAllLocal() {
  window.localStorage.clear();
  console.log("清除localStorage成功:" + getToken())
}
